@extends('layout.admin.index')
@section('content')
<body>
<div class="panel admin-panel">
  <!-- 子列表显示-管理员修改 -->
  <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>{{ $title }}</strong></div>
  <div class="body-content">

    <!-- 管理员修改开始 -->
    <form method="post" class="form-x" action="/admin/admin/doedit">  
    {{ csrf_field() }}
      <div class="form-group">
      </div>


      <!-- 修改用户名 -->
      <div class="form-group">
        <div class="label">
          <label>用户名：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" value="{{ $data['admin_name'] }}" name="admin_name" required/>
          <div class="tips"></div><br><br>
          <div style="color:#aac;margin-top:5px">(管理员用户名,用于登录后台)</div>
        </div>
      </div>

      <!-- 修改邮箱 -->
      <div class="form-group">
        <div class="label">
          <label>邮箱：</label>
        </div>
        <div class="field">
          <input type="email" class="input w50" value="{{ $data['admin_email'] }}" name="admin_email" required/>
          <div class="tips"></div><br><br>
          <div style="color:#aac;margin-top:5px">(管理员用户名,用于登录后台)</div>
        </div>
      </div>
      
      <!-- 管理员级别 -->
      <div class="form-group">
        <div class="label">
          <label>管理员级别：</label>
        </div>
        <div class="field">
          <if condition="$iscid eq 1">
              <select name="role_id" class="input" style="width:200px; line-height:17px;" onchange="changesearch()">
                <option value="">请选择分类</option>
              @foreach($role as $k => $v)
                <option value="{{ $k }}" @if($data['role_id'] == $k) selected @endif>{{ $v }}</option>
              @endforeach
              </select>
          <div style="color:#aac">(请选择管理员级别，便于管理后台。)</div>
          </if>
          <div class="tips"></div>
        </div>
      </div>


       <!-- 是否禁用 -->
      <div class="form-group">
        <div class="label">
          <label>是否禁用</label>
        </div>
        <div class="field">
          <ul>
            <li style="margin-top:10px">
                是：<input type="radio" value="2" name="admin_shield" @if($data['admin_shield'] == 2) checked @endif/>
                否：<input type="radio" value="1" name="admin_shield" @if($data['admin_shield'] == 1) checked @endif/>
            </li>
          </ul>
          <div class="tips"></div>
          <div style="color:red">(注意：禁用则该管理员无权限登录后台,默认：开启)</div>
        </div>
      </div>
      <!-- 获取index路由传参id -->
      <input type="hidden" name="id" value="{{ $data['id'] }}">


      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
          <a href="/admin/admin/index"  class="button bg-main icon-mail-reply">&nbsp返回</a>

        </div>
      </div>
    </form>
    <!-- 管理员修改结束 -->
  </div>
</div>
</body>
@endsection